<%@ page import="MySql.Goods" %>
<%@ page import="MySql.goodsManager" %><%--
  Created by IntelliJ IDEA.
  User: 浅汐
  Date: 2021/1/14
  Time: 21:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <form action="addgoods.go">
        <%!
            Goods good=new Goods();
        %>
        <%
//            out.println(good.toString());
            String s=request.getParameter("id");
            if(s!=null){
                good= goodsManager.getRowById(s);
//                out.print(s+"877");
            }
//            out.println(good.getId());
        %>
        <span style="width:50px;margin-bottom:10px;display: inline-block">id:</span><input type="text" name="id" value="<%=good.getId()==null?"":good.getId()%>">
        </br>
        <span style="width:50px;margin-bottom:10px;display: inline-block">kind:</span><input type="text" name="kind" value="<%=good.getKind()==null?"":good.getKind()%>">
        </br>
        <span style="width:50px;margin-bottom:10px;display: inline-block">title:</span><input type="text" name="title" value="<%=good.getTitle()==null?"":good.getTitle()%>">
        </br>
        <span style="width:50px;margin-bottom:10px;display: inline-block">brief:</span><input type="text" name="brief" value="<%=good.getBrief()==null?"":good.getBrief()%>">
        </br>
        <span style="width:50px;margin-bottom:10px;display: inline-block">price:</span><input type="text" name="price" value="<%=good.getPrice()==null?"":good.getPrice()%>">
        </br>
        <span style="width:50px;margin-bottom:10px;display: inline-block">img:</span><input type="text" name="img" value="<%=good.getImg()==null?"":good.getImg()%>">
        </br>
        <input type="submit" name="add" value="修改">
    </form>
</body>
</html>
